import { IsString, IsNotEmpty, IsJSON, IsEnum, IsPhoneNumber, IsArray, Min, Length, IsOptional, IsBoolean, IsNumber, IsNumberString } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class CreateAccountDto {
    @ApiProperty({ required: true })
    @IsNotEmpty()
    @IsNumberString()
    @IsPhoneNumber('CN')
    @Length(11, 11)
    account: string;

    @ApiProperty({ required: true })
    @IsNotEmpty()
    @IsString()
    @Length(1, 100)
    password: string;

    @ApiProperty({ required: true })
    @IsNotEmpty()
    @IsString()
    @Length(1, 100)
    appKey: string;

    @ApiProperty({ required: true })
    @IsNotEmpty()
    @IsString()
    @Length(1, 100)
    appSecret: string;
}
